-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolve rapid species home #10
base: main
Are you sure you want to change the base?
Conversation
app/api/resources/rapid_view.py
Outdated
# Resolve species home | ||
# https://rapid.ensembl.org/Homo_sapiens_GCA_009914755.4/ | ||
# https://rapid.ensembl.org/Homo_sapiens_GCA_009914755.4/Info/Index | ||
@router.get("/{species_url}/{subpath:path}", name="Rapid Species Home") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't species_url
properly referred to as species_url_name
?
app/api/resources/rapid_view.py
Outdated
async def resolve_species(request: Request, species_url: str, subpath: str): | ||
(species_name, accession_id) = species_url.split("_GCA_") | ||
assembly_accession_id = "GCA_" + accession_id | ||
genome_object = get_genome_id_from_accession(assembly_accession_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_genome_id_from_accession
from_assembly_accession_id?
genome_object = get_genome_id_from_accession(assembly_accession_id) | ||
if genome_object: | ||
genome_id = genome_object.get("genomeUuid") | ||
url = f"{ENSEMBL_URL}/species/{genome_id}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we get genome tag from the metadata api, by the way?
I suppose none of the species on rapid will have a genome tag; but still, what if?
This PR is to resolve rapid species home urls.
https://rapid.ensembl.org/Homo_sapiens_GCA_009914755.4/
https://rapid.ensembl.org/Homo_sapiens_GCA_009914755.4/Info/Index
Also it would redirect rapid home page to beta home - something to decide whether to do it or not.
Uses new grpc endpoint in web-metadata-api Ensembl/ensembl-web-metadata-api#63
https://www.ebi.ac.uk/panda/jira/browse/ENSWBSITES-2830